<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="include/taglib.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <c:set var="projectName" value='${fnc:getDBConfig("sys","common","project.name")}' />
    <c:set var="projectCopyright" value='${fnc:getDBConfig("sys","common","project.copyright")}' />
    <c:set var="projectVersion" value='${fnc:getDBConfig("sys","common","project.version")}' />
    <title>${projectName.configValue} - 用户登录</title>
    <%@ include file="include/head.jsp"%>
    <style type="text/css">
        body {
            padding-top: 40px;
            padding-bottom: 40px;
            background-color: #f5f5f5;
        }

        .form-signin {
            max-width: 300px;
            padding: 19px 29px 29px;
            margin: 0 auto 20px;
            background-color: #fff;
            border: 1px solid #e5e5e5;
            -webkit-border-radius: 5px;
            -moz-border-radius: 5px;
            border-radius: 5px;
            -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.05);
            -moz-box-shadow: 0 1px 2px rgba(0,0,0,.05);
            box-shadow: 0 1px 2px rgba(0,0,0,.05);
        }
        .form-signin .form-signin-heading,
        .form-signin .checkbox {
            margin-bottom: 10px;
        }
        .form-signin input[type="text"],
        .form-signin input[type="password"] {
            font-size: 16px;
            height: auto;
            margin-bottom: 15px;
            padding: 7px 9px;
        }

    </style>
</head>
<body>
<div class="container">
    <form class="form-signin" action="${ctx}/login" method="post">
        <h2 class="form-signin-heading">${projectName.configValue}</h2>
        <input type="text" name="username" id="username" required class="input-block-level" placeholder="账号">
        <input type="password" name="password" id="password" required class="input-block-level" placeholder="密码">
        <label class="checkbox">
            <input type="checkbox" id="remember-me" name="rememberMe"> 记住登录
        </label>
        <button class="btn btn-large btn-primary" type="submit">登 录</button>
    </form>
</div>
<%@ include file="include/bottom.jsp"%>
<script type="text/javascript">
    $(document).ready(function () {
        var msg = '${msg}';
        if(msg!=''){
            iuAlert(msg);
        }
        // 如果在框架或在对话框中，则弹出提示并跳转到首页
        if (top.location !== self.location) {
            iuAlert("未登录或登录超时。请重新登录，谢谢！");
            top.location="${ctx}";
        }
    });
</script>
</body>
</html>